package com.njtoyo.taxi.admin.mapper.secondary.mapper.data;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njtoyo.taxi.admin.library.Const;
import com.njtoyo.taxi.admin.mapper.master.entity.Driver;
import com.njtoyo.taxi.admin.rest.pojo.dto.funnnel.FunnelCallVO;
import com.njtoyo.taxi.admin.rest.presenter.data.funnel.CancelDataVO;
import com.njtoyo.taxi.admin.rest.wrapper.data.funnel.FunnelWrapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Repository
@DS(Const.PRIMARY_DS)
public interface FunnelMapper {
    List<FunnelCallVO> getTodayCall(@Param("wrapper") FunnelWrapper wrapper);

    List<Driver> getDriverToday(@Param("wrapper") FunnelWrapper wrapper);

    BigDecimal selectRideAmountCount(@Param("wrapper") FunnelWrapper wrapper);

    BigDecimal selectServiceAmountCount(@Param("wrapper") FunnelWrapper wrapper);

    Integer getCompleteOrderNum(@Param("wrapper") FunnelWrapper wrapper);

    Integer selecDriverCountReply(@Param("wrapper") FunnelWrapper wrapper);

    List<String> selectJoinDriver(@Param("startDate") Date startDate, @Param("endDate") Date endDate);

    List<Map<String, Object>> selectDoneOrder(@Param("wrapper") FunnelWrapper funnelWrapper);

    Page<Map<String, Object>> selectNoreply(@Param("page") Page page, @Param("funnelWrapper") FunnelWrapper funnelWrapper);

    List<CancelDataVO> getCancelList(@Param("funnelWrapper") FunnelWrapper funnelWrapper);

    List<Map<String, Object>> getSendDrivers(@Param("callId") Integer callId);

    List<Map<String, Object>> getGrabDrivers(@Param("driverIds") List<String> driverIds);

    List<Map<String, Object>> getRideCancelAnalyse(@Param("startDate") Date todayStart, @Param("endDate") Date todayEnd);
}
